/**
 */
package org.mro.grib.model.files.secondEdition.grids.impl;

import java.nio.ByteBuffer;
import java.util.Collection;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;

import org.eclipse.emf.ecore.util.EDataTypeUniqueEList;

import org.mro.grib.model.files.secondEdition.grids.GridDefinitionTemplate3120;
import org.mro.grib.model.files.secondEdition.grids.GridsPackage;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Grid Definition Template3120</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate3120Impl#getNumberOfDataBinsAlongRadials <em>Number Of Data Bins Along Radials</em>}</li>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate3120Impl#getNumberOfRadials <em>Number Of Radials</em>}</li>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate3120Impl#getLatitudeOfCentrePoint <em>Latitude Of Centre Point</em>}</li>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate3120Impl#getLongitudeOfCentrePoint <em>Longitude Of Centre Point</em>}</li>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate3120Impl#getSpacingOfBinsAlongRadials <em>Spacing Of Bins Along Radials</em>}</li>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate3120Impl#getOffsetFromOriginToInnerBound <em>Offset From Origin To Inner Bound</em>}</li>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate3120Impl#getScanningMode <em>Scanning Mode</em>}</li>
 *   <li>{@link org.mro.grib.model.files.secondEdition.grids.impl.GridDefinitionTemplate3120Impl#getRadialOffset <em>Radial Offset</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class GridDefinitionTemplate3120Impl extends EObjectImpl implements GridDefinitionTemplate3120 {
	/**
	 * The default value of the '{@link #getNumberOfDataBinsAlongRadials() <em>Number Of Data Bins Along Radials</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getNumberOfDataBinsAlongRadials()
	 * @generated
	 * @ordered
	 */
	protected static final int NUMBER_OF_DATA_BINS_ALONG_RADIALS_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getNumberOfDataBinsAlongRadials() <em>Number Of Data Bins Along Radials</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getNumberOfDataBinsAlongRadials()
	 * @generated
	 * @ordered
	 */
	protected int numberOfDataBinsAlongRadials = NUMBER_OF_DATA_BINS_ALONG_RADIALS_EDEFAULT;

	/**
	 * The default value of the '{@link #getNumberOfRadials() <em>Number Of Radials</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getNumberOfRadials()
	 * @generated
	 * @ordered
	 */
	protected static final int NUMBER_OF_RADIALS_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getNumberOfRadials() <em>Number Of Radials</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getNumberOfRadials()
	 * @generated
	 * @ordered
	 */
	protected int numberOfRadials = NUMBER_OF_RADIALS_EDEFAULT;

	/**
	 * The default value of the '{@link #getLatitudeOfCentrePoint() <em>Latitude Of Centre Point</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLatitudeOfCentrePoint()
	 * @generated
	 * @ordered
	 */
	protected static final int LATITUDE_OF_CENTRE_POINT_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getLatitudeOfCentrePoint() <em>Latitude Of Centre Point</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLatitudeOfCentrePoint()
	 * @generated
	 * @ordered
	 */
	protected int latitudeOfCentrePoint = LATITUDE_OF_CENTRE_POINT_EDEFAULT;

	/**
	 * The default value of the '{@link #getLongitudeOfCentrePoint() <em>Longitude Of Centre Point</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLongitudeOfCentrePoint()
	 * @generated
	 * @ordered
	 */
	protected static final int LONGITUDE_OF_CENTRE_POINT_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getLongitudeOfCentrePoint() <em>Longitude Of Centre Point</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLongitudeOfCentrePoint()
	 * @generated
	 * @ordered
	 */
	protected int longitudeOfCentrePoint = LONGITUDE_OF_CENTRE_POINT_EDEFAULT;

	/**
	 * The default value of the '{@link #getSpacingOfBinsAlongRadials() <em>Spacing Of Bins Along Radials</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSpacingOfBinsAlongRadials()
	 * @generated
	 * @ordered
	 */
	protected static final int SPACING_OF_BINS_ALONG_RADIALS_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getSpacingOfBinsAlongRadials() <em>Spacing Of Bins Along Radials</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSpacingOfBinsAlongRadials()
	 * @generated
	 * @ordered
	 */
	protected int spacingOfBinsAlongRadials = SPACING_OF_BINS_ALONG_RADIALS_EDEFAULT;

	/**
	 * The default value of the '{@link #getOffsetFromOriginToInnerBound() <em>Offset From Origin To Inner Bound</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getOffsetFromOriginToInnerBound()
	 * @generated
	 * @ordered
	 */
	protected static final int OFFSET_FROM_ORIGIN_TO_INNER_BOUND_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getOffsetFromOriginToInnerBound() <em>Offset From Origin To Inner Bound</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getOffsetFromOriginToInnerBound()
	 * @generated
	 * @ordered
	 */
	protected int offsetFromOriginToInnerBound = OFFSET_FROM_ORIGIN_TO_INNER_BOUND_EDEFAULT;

	/**
	 * The default value of the '{@link #getScanningMode() <em>Scanning Mode</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getScanningMode()
	 * @generated
	 * @ordered
	 */
	protected static final byte SCANNING_MODE_EDEFAULT = 0x00;

	/**
	 * The cached value of the '{@link #getScanningMode() <em>Scanning Mode</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getScanningMode()
	 * @generated
	 * @ordered
	 */
	protected byte scanningMode = SCANNING_MODE_EDEFAULT;

	/**
	 * The cached value of the '{@link #getRadialOffset() <em>Radial Offset</em>}' attribute list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getRadialOffset()
	 * @generated
	 * @ordered
	 */
	protected EList<Long> radialOffset;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected GridDefinitionTemplate3120Impl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return GridsPackage.Literals.GRID_DEFINITION_TEMPLATE3120;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getNumberOfDataBinsAlongRadials() {
		return numberOfDataBinsAlongRadials;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setNumberOfDataBinsAlongRadials(int newNumberOfDataBinsAlongRadials) {
		int oldNumberOfDataBinsAlongRadials = numberOfDataBinsAlongRadials;
		numberOfDataBinsAlongRadials = newNumberOfDataBinsAlongRadials;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE3120__NUMBER_OF_DATA_BINS_ALONG_RADIALS, oldNumberOfDataBinsAlongRadials, numberOfDataBinsAlongRadials));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getNumberOfRadials() {
		return numberOfRadials;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setNumberOfRadials(int newNumberOfRadials) {
		int oldNumberOfRadials = numberOfRadials;
		numberOfRadials = newNumberOfRadials;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE3120__NUMBER_OF_RADIALS, oldNumberOfRadials, numberOfRadials));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getLatitudeOfCentrePoint() {
		return latitudeOfCentrePoint;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setLatitudeOfCentrePoint(int newLatitudeOfCentrePoint) {
		int oldLatitudeOfCentrePoint = latitudeOfCentrePoint;
		latitudeOfCentrePoint = newLatitudeOfCentrePoint;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE3120__LATITUDE_OF_CENTRE_POINT, oldLatitudeOfCentrePoint, latitudeOfCentrePoint));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getLongitudeOfCentrePoint() {
		return longitudeOfCentrePoint;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setLongitudeOfCentrePoint(int newLongitudeOfCentrePoint) {
		int oldLongitudeOfCentrePoint = longitudeOfCentrePoint;
		longitudeOfCentrePoint = newLongitudeOfCentrePoint;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE3120__LONGITUDE_OF_CENTRE_POINT, oldLongitudeOfCentrePoint, longitudeOfCentrePoint));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getSpacingOfBinsAlongRadials() {
		return spacingOfBinsAlongRadials;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setSpacingOfBinsAlongRadials(int newSpacingOfBinsAlongRadials) {
		int oldSpacingOfBinsAlongRadials = spacingOfBinsAlongRadials;
		spacingOfBinsAlongRadials = newSpacingOfBinsAlongRadials;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE3120__SPACING_OF_BINS_ALONG_RADIALS, oldSpacingOfBinsAlongRadials, spacingOfBinsAlongRadials));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getOffsetFromOriginToInnerBound() {
		return offsetFromOriginToInnerBound;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setOffsetFromOriginToInnerBound(int newOffsetFromOriginToInnerBound) {
		int oldOffsetFromOriginToInnerBound = offsetFromOriginToInnerBound;
		offsetFromOriginToInnerBound = newOffsetFromOriginToInnerBound;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE3120__OFFSET_FROM_ORIGIN_TO_INNER_BOUND, oldOffsetFromOriginToInnerBound, offsetFromOriginToInnerBound));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public byte getScanningMode() {
		return scanningMode;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setScanningMode(byte newScanningMode) {
		byte oldScanningMode = scanningMode;
		scanningMode = newScanningMode;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GridsPackage.GRID_DEFINITION_TEMPLATE3120__SCANNING_MODE, oldScanningMode, scanningMode));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<Long> getRadialOffset() {
		if (radialOffset == null) {
			radialOffset = new EDataTypeUniqueEList<Long>(Long.class, this, GridsPackage.GRID_DEFINITION_TEMPLATE3120__RADIAL_OFFSET);
		}
		return radialOffset;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case GridsPackage.GRID_DEFINITION_TEMPLATE3120__NUMBER_OF_DATA_BINS_ALONG_RADIALS:
				return getNumberOfDataBinsAlongRadials();
			case GridsPackage.GRID_DEFINITION_TEMPLATE3120__NUMBER_OF_RADIALS:
				return getNumberOfRadials();
			case GridsPackage.GRID_DEFINITION_TEMPLATE3120__LATITUDE_OF_CENTRE_POINT:
				return getLatitudeOfCentrePoint();
			case GridsPackage.GRID_DEFINITION_TEMPLATE3120__LONGITUDE_OF_CENTRE_POINT:
				return getLongitudeOfCentrePoint();
			case GridsPackage.GRID_DEFINITION_TEMPLATE3120__SPACING_OF_BINS_ALONG_RADIALS:
				return getSpacingOfBinsAlongRadials();
			case GridsPackage.GRID_DEFINITION_TEMPLATE3120__OFFSET_FROM_ORIGIN_TO_INNER_BOUND:
				return getOffsetFromOriginToInnerBound();
			case GridsPackage.GRID_DEFINITION_TEMPLATE3120__SCANNING_MODE:
				return getScanningMode();
			case GridsPackage.GRID_DEFINITION_TEMPLATE3120__RADIAL_OFFSET:
				return getRadialOffset();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@SuppressWarnings("unchecked")
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case GridsPackage.GRID_DEFINITION_TEMPLATE3120__NUMBER_OF_DATA_BINS_ALONG_RADIALS:
				setNumberOfDataBinsAlongRadials((Integer)newValue);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3120__NUMBER_OF_RADIALS:
				setNumberOfRadials((Integer)newValue);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3120__LATITUDE_OF_CENTRE_POINT:
				setLatitudeOfCentrePoint((Integer)newValue);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3120__LONGITUDE_OF_CENTRE_POINT:
				setLongitudeOfCentrePoint((Integer)newValue);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3120__SPACING_OF_BINS_ALONG_RADIALS:
				setSpacingOfBinsAlongRadials((Integer)newValue);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3120__OFFSET_FROM_ORIGIN_TO_INNER_BOUND:
				setOffsetFromOriginToInnerBound((Integer)newValue);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3120__SCANNING_MODE:
				setScanningMode((Byte)newValue);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3120__RADIAL_OFFSET:
				getRadialOffset().clear();
				getRadialOffset().addAll((Collection<? extends Long>)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case GridsPackage.GRID_DEFINITION_TEMPLATE3120__NUMBER_OF_DATA_BINS_ALONG_RADIALS:
				setNumberOfDataBinsAlongRadials(NUMBER_OF_DATA_BINS_ALONG_RADIALS_EDEFAULT);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3120__NUMBER_OF_RADIALS:
				setNumberOfRadials(NUMBER_OF_RADIALS_EDEFAULT);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3120__LATITUDE_OF_CENTRE_POINT:
				setLatitudeOfCentrePoint(LATITUDE_OF_CENTRE_POINT_EDEFAULT);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3120__LONGITUDE_OF_CENTRE_POINT:
				setLongitudeOfCentrePoint(LONGITUDE_OF_CENTRE_POINT_EDEFAULT);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3120__SPACING_OF_BINS_ALONG_RADIALS:
				setSpacingOfBinsAlongRadials(SPACING_OF_BINS_ALONG_RADIALS_EDEFAULT);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3120__OFFSET_FROM_ORIGIN_TO_INNER_BOUND:
				setOffsetFromOriginToInnerBound(OFFSET_FROM_ORIGIN_TO_INNER_BOUND_EDEFAULT);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3120__SCANNING_MODE:
				setScanningMode(SCANNING_MODE_EDEFAULT);
				return;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3120__RADIAL_OFFSET:
				getRadialOffset().clear();
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case GridsPackage.GRID_DEFINITION_TEMPLATE3120__NUMBER_OF_DATA_BINS_ALONG_RADIALS:
				return numberOfDataBinsAlongRadials != NUMBER_OF_DATA_BINS_ALONG_RADIALS_EDEFAULT;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3120__NUMBER_OF_RADIALS:
				return numberOfRadials != NUMBER_OF_RADIALS_EDEFAULT;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3120__LATITUDE_OF_CENTRE_POINT:
				return latitudeOfCentrePoint != LATITUDE_OF_CENTRE_POINT_EDEFAULT;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3120__LONGITUDE_OF_CENTRE_POINT:
				return longitudeOfCentrePoint != LONGITUDE_OF_CENTRE_POINT_EDEFAULT;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3120__SPACING_OF_BINS_ALONG_RADIALS:
				return spacingOfBinsAlongRadials != SPACING_OF_BINS_ALONG_RADIALS_EDEFAULT;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3120__OFFSET_FROM_ORIGIN_TO_INNER_BOUND:
				return offsetFromOriginToInnerBound != OFFSET_FROM_ORIGIN_TO_INNER_BOUND_EDEFAULT;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3120__SCANNING_MODE:
				return scanningMode != SCANNING_MODE_EDEFAULT;
			case GridsPackage.GRID_DEFINITION_TEMPLATE3120__RADIAL_OFFSET:
				return radialOffset != null && !radialOffset.isEmpty();
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (numberOfDataBinsAlongRadials: "); //$NON-NLS-1$
		result.append(numberOfDataBinsAlongRadials);
		result.append(", numberOfRadials: "); //$NON-NLS-1$
		result.append(numberOfRadials);
		result.append(", latitudeOfCentrePoint: "); //$NON-NLS-1$
		result.append(latitudeOfCentrePoint);
		result.append(", longitudeOfCentrePoint: "); //$NON-NLS-1$
		result.append(longitudeOfCentrePoint);
		result.append(", spacingOfBinsAlongRadials: "); //$NON-NLS-1$
		result.append(spacingOfBinsAlongRadials);
		result.append(", offsetFromOriginToInnerBound: "); //$NON-NLS-1$
		result.append(offsetFromOriginToInnerBound);
		result.append(", scanningMode: "); //$NON-NLS-1$
		result.append(scanningMode);
		result.append(", radialOffset: "); //$NON-NLS-1$
		result.append(radialOffset);
		result.append(')');
		return result.toString();
	}

	/* (non-Javadoc)
	 * @see org.mro.grib.model.files.secondEdition.grids.IGridDefinition#initialise(java.nio.ByteBuffer)
	 */
	@Override
	public void initialise(ByteBuffer buffer) {
		numberOfDataBinsAlongRadials = buffer.getInt();
		numberOfRadials = buffer.getInt();
		latitudeOfCentrePoint = buffer.getInt();
		longitudeOfCentrePoint = buffer.getInt();
		spacingOfBinsAlongRadials = buffer.getInt();
		offsetFromOriginToInnerBound = buffer.getInt();
		scanningMode = buffer.get();
		radialOffset.add(Long.valueOf(buffer.position()));
		
		for(int i = 1 ; i < numberOfRadials + 1 ; i++)
		{
			radialOffset.add(Long.valueOf(buffer.position() - 1 + i * (Integer.SIZE / Byte.SIZE)));
		}
	}

} //GridDefinitionTemplate3120Impl
